package oa.dao.impl;

import java.util.Collection;

import javax.annotation.Resource;

import org.springframework.orm.hibernate3.HibernateTemplate;
import org.springframework.stereotype.Repository;

import oa.dao.ForumDao;
import oa.dao.base.impl.BaseDaoImpl;
import oa.domain.forum.Forum;

@Repository("forumDao")
public class ForumDaoImpl extends BaseDaoImpl<Forum> implements ForumDao {

	@Resource(name="hibernateTemplate")	
	public HibernateTemplate hibernateTemplate;
	
	@SuppressWarnings("unchecked")
	@Override
	public Collection<Forum> getAllEntry() {
		// TODO Auto-generated method stub
		return (Collection<Forum>)this.hibernateTemplate.find("from Forum f order by f.position");
	}
}
